package org.example.kg_back.service.imp;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.kg_back.PoJo.entity.AirLine;
import org.example.kg_back.mapper.AirLineMapper;
import org.example.kg_back.service.AirLineService;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AirLineServiceImp extends ServiceImpl<AirLineMapper, AirLine> implements AirLineService {

	/**
	 * 查询所有航线信息
	 */
	public List<AirLine> findAll(){
		return baseMapper.selectList(null);
	}

	/**
	 * 查询国内航班数前十的航线
	 */
	public List<AirLine> findBylimit(){
		List<AirLine> airLines = baseMapper.findBylimit();
		return airLines;
	}

	/**
	 * 查询总航线数
	 */
	public Integer findLineCount(){
		return baseMapper.findLineCount();
	}

}
